﻿<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
 
    <script type='text/html' template> 
        <input type='hidden' name='PID' value="{{ d.params.PID || '' }}"/>
    </script>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>订单号</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='OrderNumber' value='{{ d.params.OrderNumber || '' }}' lay-verify='required' placeholder='订单号' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>标题</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='Title' value='{{ d.params.Title || '' }}' lay-verify='required' placeholder='标题' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>     
    <div class='layui-form-item'>
        <label class='layui-form-label'>状态 </label>
        <div class='layui-input-block'>
            <div class='layui-input-inline'>
                <script type='text/html' template>
                    <select readonly='readonly' name='State_Sel'>                      <option value='0' {{ d.params.State_Sel == '0' ? 'selected' : '' }}>待回复</option>                      <option value='1' {{ d.params.State_Sel == '1' ? 'selected' : '' }}>待客户回复</option>                      <option value='2' {{ d.params.State_Sel == '2' ? 'selected' : '' }}>处理中</option>                      <option value='3' {{ d.params.State_Sel == '3' ? 'selected' : '' }}>已完成</option>
                    </select>
                </script> 
            </div>
        </div>
    </div>
         
    <div class='layui-form-item'>
        <label class='layui-form-label'>投诉类型 </label>
        <div class='layui-input-block'>
            <div class='layui-input-inline'>
                <script type='text/html' template>
                    <select readonly='readonly' name='Type_Sel'>                      <option value='0' {{ d.params.Type_Sel == '0' ? 'selected' : '' }}>商品纠纷</option>                      <option value='1' {{ d.params.Type_Sel == '1' ? 'selected' : '' }}>服务纠纷</option>                      <option value='2' {{ d.params.Type_Sel == '2' ? 'selected' : '' }}>物流配送</option>                      <option value='3' {{ d.params.Type_Sel == '3' ? 'selected' : '' }}>其他</option>
                    </select>
                </script> 
            </div>
        </div>
    </div>
       
    <div class='layui-form-item'>
        <label class='layui-form-label'>联系人</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='UserNamee' value='{{ d.params.UserNamee || '' }}' lay-verify='required' placeholder='联系人' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>联系电话</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='UserTel' value='{{ d.params.UserTel || '' }}' lay-verify='required' placeholder='联系电话' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>投诉描述</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='Description' value='{{ d.params.Description || '' }}' lay-verify='required' placeholder='投诉描述' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>提交原因</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='Reason' value='{{ d.params.Reason || '' }}' lay-verify='required' placeholder='提交原因' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>图片</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='Images' value='{{ d.params.Images || '' }}' lay-verify='required' placeholder='图片' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>备注</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='RMK' value='{{ d.params.RMK || '' }}' lay-verify='required' placeholder='备注' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>    
    <div class='layui-form-item'>
        <label class='layui-form-label'>商品订单 </label>
        <div class='layui-input-block'>
            <div class='layui-input-inline'>
                <script type='text/html' template lay-done='layui.data.getSelSource(d.params,"OrderPID_SelSource");'>
                    <select name='OrderPID_SelSource' readonly='readonly' id='OrderPID_SelSource' lay-search></select>
                </script>
            </div>
        </div>
    </div>    
    <div class='layui-form-item'>
        <label class='layui-form-label'>订单商品 </label>
        <div class='layui-input-block'>
            <div class='layui-input-inline'>
                <script type='text/html' template lay-done='layui.data.getSelSource(d.params,"OrderGoodsPID_SelSource");'>
                    <select name='OrderGoodsPID_SelSource' readonly='readonly' id='OrderGoodsPID_SelSource' lay-search></select>
                </script>
            </div>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>商品名称</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='Name' value='{{ d.params.Name || '' }}' lay-verify='required' placeholder='商品名称' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>商品图片</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='Picture' value='{{ d.params.Picture || '' }}' lay-verify='required' placeholder='商品图片' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>店铺ID</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='StoreID' value='{{ d.params.StoreID || '' }}' lay-verify='required' placeholder='店铺ID' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>   
    <div class='layui-form-item'>
        <label class='layui-form-label'>供应商ID</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' readonly='readonly' name='SupplierID' value='{{ d.params.SupplierID || '' }}' lay-verify='required' placeholder='供应商ID' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div> 
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button"  onclick="Close()" value="关闭" class="layui-btn">
        </div>
    </div>
</div>

<script type="text/javascript">  
    function Close(){
        layer.closeAll();
    }

    layui.use(['form','admin','upload','laydate'], function () {
        var form = layui.form;//required（必填项）phone（手机号）email（邮箱）url（网址）number（数字）date（日期）identity（身份证） 自定义值
    });
    
    
    layui.data.getSelSource = function (d,sourceName) { 
            var $ = layui.$;
            var form = layui.form;
            var admin = layui.admin;

            if (sourceName == "OrderPID_SelSource") {
                admin.req({
                    url: layui.setter.APIUrl + '/shop/orderMgr/customerQuery', //实际使用请改成服务端真实接口
                    type: 'post',
                    done: function (res) {
                        //$("#OrderPID_SelSource").append("<option value=''>全部</option>");
                        layui.each(res.Data, function (index, eachdata) {
                            var strIsSel = '';
                            if (eachdata.PID == d.OrderPID_SelSource)
                                strIsSel = "selected='selected'"; 
                            $("#OrderPID_SelSource").append("<option value='" + eachdata.PID + "' " + strIsSel + ">" + eachdata.OrderNumber + "</option>");
                        });
                        form.render('select');
                    }
                }); 
            }

            if (sourceName == "OrderGoodsPID_SelSource") {
                admin.req({
                    url: layui.setter.APIUrl + '/shop/order_goodsMgr/customerQuery', //实际使用请改成服务端真实接口
                    type: 'post',
                    done: function (res) {
                        //$("#OrderGoodsPID_SelSource").append("<option value=''>全部</option>");
                        layui.each(res.Data, function (index, eachdata) {
                            var strIsSel = '';
                            if (eachdata.PID == d.OrderGoodsPID_SelSource)
                                strIsSel = "selected='selected'"; 
                            $("#OrderGoodsPID_SelSource").append("<option value='" + eachdata.PID + "' " + strIsSel + ">" + eachdata.Name + "</option>");
                        });
                        form.render('select');
                    }
                }); 
            }
 
    }
 
    
    layui.data.setUpload = function (d) { 
            var $ = layui.$,
            upload = layui.upload,
            admin = layui.admin;
            var formSelects = layui.formSelects;
 
    }

    
    layui.data.datedone = function (d) { 
            var laydate = layui.laydate;
 
    }
    
</script>
